package com.tc.dispatch.web.common.login;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: ZJU</p>
 * @author DxFeng
 * @version 1.0
 */

public class logout extends HttpServlet
{
  static final private String CONTENT_TYPE = "text/html; charset=GBK";
  //Initialize global variables
  public void init() throws ServletException
  {
  }
  //Process the HTTP Get request
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
  {
      response.setContentType("text/html; charset=GBK");
      request.getSession().invalidate();
      PrintWriter out = response.getWriter();

      out.println("<script language=\"JavaScript\">");
      out.println("window.close();");
      out.println("</script>");

  }
  //Clean up resources
  public void destroy()
  {
  }
}
